package net.csdn.business.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author likun
 * @date 2022/6/25 16:48
 */
public interface AliEmailEnum {
    @Getter
    @AllArgsConstructor
    enum TagEnum {

        SUBMITCOMMENTED("submitCommented", "提交被评论"),
        MRCOMMENTED("mrCommented", "mr被评论"),
        ASSIGNEDTOREVIEW("assignedToReview", "被指派评审"),
        MRNEWSUBMIT("mrNewSubmit", "MR新增提交"),
        MRPASSED("mrPassed", "审核通过"),
        MRMERGED("mrMerged", "审核被合并"),
        MRCLOSED("mrClosed", "审核被关闭"),
        MROPENED("mrOpened", "审核被打开"),
        REMOVEMEMBERROLE("removeMemberRole", "移除成员权限"),
        ROLECHANGE("roleChange", "角色变更"),
        REPOPATHCHANGED("repoPathChanged", "代码库路径变动"),
        DELETEREPO("deleteRepo", "删库"),
        REPOPUBLIC("repoPublic", "库被设置为公开"),
        REPOPRIVATE("repoPrivate", "库被设置为私有");
        private final String type;
        private final String desc;

        public static TagEnum ofType(String type) {
            for (TagEnum targetType : TagEnum.values()) {
                if (targetType.type.equals(type)) {
                    return targetType;
                }
            }
            throw new IllegalArgumentException("InvitationEnum#TypeEnum param error");
        }
    }
}
